package com.sofwin.service.impl;

import com.sofwin.mapper.SysResourceMapper;
import com.sofwin.pojo.SysResource;
import com.sofwin.service.ResourceService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @packageName: com.sofwin.service.impl
 * @user: andyliu
 * @date: 2023/5/17 17:12
 * @email 115176513@qq.com
 * @description: TODO
 */
@Service("resourceService")
public class ResourceServiceImpl implements ResourceService {
    @Autowired
    private SysResourceMapper mapper;
    @Override
    public List<SysResource> queryResources() {
        return mapper.selectByExample(null);
    }

    @Override
    public List<SysResource> queryResourcesByRoleId(Integer roleId) {
        return mapper.selectResourcesByRoleId(roleId);
    }
}
